package com.mimiwang.user.interceptor;


import com.mimiwang.common.utils.NetworkUtils;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author hustart1@126.com
 * @version 1.0.0
 * @ClassName LimitInterceptor
 * @Description
 * @createTime 2022年10月05日 22:06:00
 */


public class LimitInterceptor implements HandlerInterceptor {
    RedisTemplate redisTemplate;
    public LimitInterceptor(RedisTemplate redisTemplate){
        this.redisTemplate = redisTemplate;
    }


    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {

        String ipAddress = NetworkUtils.getIpAddress(request);

        return false;
    }

    @Override
    public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {

    }

    @Override
    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {

    }
}
